<?php
include('include/config.inc.php');
if(!isset($_SESSION['s_activId'.$cfgPack])
  || (isset($_SESSION['s_userType'.$cfgPack]) && isset($cfgFileNames['party'][$_SESSION['s_userType'.$cfgPack]]) 
      && $cfgFileNames['party'][$_SESSION['s_userType'.$cfgPack]] == 0))
{
  $_SESSION['s_urlRedirectDir'] = $_SERVER['REQUEST_URI'];
  header("Location:checkLogin.php");
}
else
{
  
  $itemId   = "";
  $itemName = "";
  
  $selectItem= "SELECT item.itemId,item.itemName
                  FROM item
                  JOIN subcategory
                 WHERE subcategory.subCategoryId = '".$_GET['subCategoryId']."'
                   AND item.subCategoryId = subcategory.subCategoryId";
  $itemResult = mysql_query($selectItem);
  $d = 0;
  while($itemRow = mysql_fetch_array($itemResult))
  {
    $itemId[$d]   = $itemRow['itemId'];
    $itemName[$d] = $itemRow['itemName'];
    $d++;
  }  
  
  include("./bottom.php");
  $smarty->assign("itemId",$itemId);
  $smarty->assign("itemName",$itemName);
  $smarty->display("newInstallItemAj.tpl");
}
?>
  